home *** CD-ROM | disk | FTP | other *** search
-
-
-
- GGGGEEEETTTTMMMMNNNNTTTTEEEENNNNTTTT((((3333)))) GGGGEEEETTTTMMMMNNNNTTTTEEEENNNNTTTT((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- setmntent, getmntent, addmntent, getmntany, endmntent, hasmntopt - get
- file system descriptor file entry
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<mmmmnnnntttteeeennnntttt....hhhh>>>>
-
- FFFFIIIILLLLEEEE ****sssseeeettttmmmmnnnntttteeeennnntttt((((cccchhhhaaaarrrr ****ffffiiiilllleeeepppp,,,, cccchhhhaaaarrrr ****ttttyyyyppppeeee))));;;;
-
- ssssttttrrrruuuucccctttt mmmmnnnntttteeeennnntttt ****ggggeeeettttmmmmnnnntttteeeennnntttt((((FFFFIIIILLLLEEEE ****ffffiiiilllleeeepppp))));;;;
-
- iiiinnnntttt aaaaddddddddmmmmnnnntttteeeennnntttt((((FFFFIIIILLLLEEEE ****ffffiiiilllleeeepppp,,,, ssssttttrrrruuuucccctttt mmmmnnnntttteeeennnntttt ****mmmmnnnntttt))));;;;
-
- iiiinnnntttt ggggeeeettttmmmmnnnnttttaaaannnnyyyy ((((FFFFIIIILLLLEEEE ****ffffiiiilllleeeepppp,,,, ssssttttrrrruuuucccctttt mmmmnnnntttteeeennnntttt ****mmmmpppp,,,, ssssttttrrrruuuucccctttt mmmmnnnntttteeeennnntttt ****mmmmpppprrrreeeeffff))));;;;
-
- cccchhhhaaaarrrr ****hhhhaaaassssmmmmnnnnttttoooopppptttt((((ssssttttrrrruuuucccctttt mmmmnnnntttteeeennnntttt ****mmmmnnnntttt,,,, cccchhhhaaaarrrr ****oooopppptttt))));;;;
-
- iiiinnnntttt eeeennnnddddmmmmnnnntttteeeennnntttt((((FFFFIIIILLLLEEEE ****ffffiiiilllleeeepppp))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- These routines replace the _g_e_t_f_s_e_n_t routines for accessing the file
- system description file /_e_t_c/_f_s_t_a_b. They are also used to access the
- mounted file system description file /_e_t_c/_m_t_a_b.
-
- _S_e_t_m_n_t_e_n_t opens a file system description file and returns a file pointer
- which can then be used with _g_e_t_m_n_t_e_n_t, _a_d_d_m_n_t_e_n_t, _g_e_t_m_n_t_a_n_y, or
- _e_n_d_m_n_t_e_n_t. The _t_y_p_e argument is the same as in _f_o_p_e_n(3S).
-
- _G_e_t_m_n_t_e_n_t reads the next line from _f_i_l_e_p and returns a pointer to an
- object with the following structure containing the broken-out fields of a
- line in the filesystem description file, <_m_n_t_e_n_t._h>. The fields have
- meanings described in _f_s_t_a_b(4).
-
- struct mntent {
- char *mnt_fsname; /* file system name */
- char *mnt_dir; /* file system path prefix */
- char *mnt_type; /* dbg, efs, nfs */
- char *mnt_opts; /* ro, hide, etc. */
- int mnt_freq; /* dump frequency, in days */
- int mnt_passno; /* pass number on parallel fsck */
- };
-
-
- _A_d_d_m_n_t_e_n_t adds the _m_n_t_e_n_t structure _m_n_t to the end of the open file
- _f_i_l_e_p. Note that _f_i_l_e_p has to be opened for writing if this is to work.
- _A_d_d_m_n_t_e_n_t returns 0 if successful, otherwise it returns 1.
-
- _G_e_t_m_n_t_a_n_y searches the file referenced by _f_p until a match is found
- between a line in the file and _m_p_r_e_f. _M_p_r_e_f matches the line if all
- non-null entries in _m_p_r_e_f match the corresponding fields in the file.
- Note that option string matching is performed by matching the entire
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- GGGGEEEETTTTMMMMNNNNTTTTEEEENNNNTTTT((((3333)))) GGGGEEEETTTTMMMMNNNNTTTTEEEENNNNTTTT((((3333))))
-
-
-
- option string, not by matching indivudual option substrings. If a match
- is found, the matching entry is copied to the area pointed by by _m_p, and
- _g_e_t_m_n_t_a_n_y returns 0. Otherwise, -1 is returned.
-
- _H_a_s_m_n_t_o_p_t scans the _m_n_t__o_p_t_s field of the _m_n_t_e_n_t structure _m_n_t for a
- substring that matches _o_p_t. It returns the address of the substring if a
- match is found, 0 otherwise.
-
- _E_n_d_m_n_t_e_n_t closes the file and always returns 1.
-
- FFFFIIIILLLLEEEESSSS
- /etc/fstab
- /etc/mtab
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- delmntent(3), fstab(4)
-
- BBBBUUUUGGGGSSSS
- The returned _m_n_t_e_n_t structure points to static information that is
- overwritten in each call.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-